package com.mxl.user.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mxl.user.mapper.UserMapper;
import com.mxl.user.service.IUserService;
import com.mxl.user.entity.Users;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author mxl
 * @since 2024-06-11
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, Users> implements IUserService {

    @Autowired
    private  UserMapper userMapper;

    @Override
    public String sayHello(String name) {
        return "Hello, " + name;
    }

    @Override
    public  IPage<Map<String,Object>> selectUserList(Integer pageNo,Integer pageSize,String name) {

        Page page=new Page(pageNo,pageSize);
        IPage<Map<String,Object>>  listPage=userMapper.selectUserList(page,name);
        return listPage;
    }
}
